package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysThaliMapper;
import com.ruoyi.system.domain.SysThali;
import com.ruoyi.system.service.ISysThaliService;

/**
 * 消费套餐Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class SysThaliServiceImpl implements ISysThaliService 
{
    @Autowired
    private SysThaliMapper sysThaliMapper;

    /**
     * 查询消费套餐
     * 
     * @param id 消费套餐主键
     * @return 消费套餐
     */
    @Override
    public SysThali selectSysThaliById(Long id)
    {
        return sysThaliMapper.selectSysThaliById(id);
    }

    /**
     * 查询消费套餐列表
     * 
     * @param sysThali 消费套餐
     * @return 消费套餐
     */
    @Override
    public List<SysThali> selectSysThaliList(SysThali sysThali)
    {
        return sysThaliMapper.selectSysThaliList(sysThali);
    }

    /**
     * 新增消费套餐
     * 
     * @param sysThali 消费套餐
     * @return 结果
     */
    @Override
    public int insertSysThali(SysThali sysThali)
    {
        sysThali.setCreateTime(DateUtils.getNowDate());
        return sysThaliMapper.insertSysThali(sysThali);
    }

    /**
     * 修改消费套餐
     * 
     * @param sysThali 消费套餐
     * @return 结果
     */
    @Override
    public int updateSysThali(SysThali sysThali)
    {
        sysThali.setUpdateTime(DateUtils.getNowDate());
        return sysThaliMapper.updateSysThali(sysThali);
    }

    /**
     * 批量删除消费套餐
     * 
     * @param ids 需要删除的消费套餐主键
     * @return 结果
     */
    @Override
    public int deleteSysThaliByIds(Long[] ids)
    {
        return sysThaliMapper.deleteSysThaliByIds(ids);
    }

    /**
     * 删除消费套餐信息
     * 
     * @param id 消费套餐主键
     * @return 结果
     */
    @Override
    public int deleteSysThaliById(Long id)
    {
        return sysThaliMapper.deleteSysThaliById(id);
    }
}
